import sqlite3
import os

from datastore import DataStore

from sqlitedatastore import *

class TestData():
    def __init__(self):
        self.id = 1
        self.name = "name"

    def key(self):
        return "id"

    def __str__(self):
        return "{0} , {1}".format(self.id, self.name)

if __name__ == "__main__":
    test_data = TestData()

    data_store = SqliteDataStore()
    data_store.initialize(test_data)
    
    data_store.create_schema(test_data)
    
    data_store.save(test_data)

    results = data_store.get(test_data)

    print "results received", len(results)

    for r in results:
        print r

    data_store.delete_schema(test_data)

            
        
    
        
